<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <meta name="Keywords" content="wild">
  <meta name="description" content="" />
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

  <title>report daily list</title>
  <link rel="stylesheet" type="text/css" href="/static/css/common.css">
  <link rel="stylesheet" type="text/css" href="/static/js/lib/datatable/datatable.css" />

  <script type="text/javascript" src="/static/js/lib/jquery/3.2.1/jquery.js"></script>
  <script type="text/javascript" src="/static/js/lib/datatable/datatable.js"></script>
  <script type="text/javascript" src="/static/js/util/consts.js"></script>
  <script type="text/javascript" src="/static/js/util/config.js"></script>
  <script type="text/javascript" src="/static/js/util/common.js"></script>
  <script type="text/javascript" src="/static/js/util/frame.js"></script>
  <script type="text/javascript" src="/static/js/modules/report.js"></script>

  <script type="text/javascript">
    pageConfiguration.needAuth = true;
    function onload() {
      renderReportMenu(2);

      var dataTable = new DataTable();

      var table = $('#data-table-list');
      var index = 0;
      dataTable.init({
        src: table,
        dataTable: {
          ajax: {
            url: GlobalConfig.serverUrl + '/api/report/dailyIndexList',
            type: 'GET',
            data: {},
            headers: getRequestHeaders(),
            error: function(xhr) {
              ExceptionHandler.handleCommonError(xhr);
            }
          },
          dataSrc: 'data',
          columns: [
            {
              title: '序号',
              render: function(row) {
                return ++index;
              }
            },
            {
              title: '名称',
              render: function(row) {
                return row.name;
              }
            },
            {
              title: '代码',
              render: function(row) {
                return row.code;
              }
            },
            {
              title: '最低',
              render: function(row) {
                return row.lowestPrice;
              }
            },
            {
              title: '最高',
              render: function(row) {
                return row.highestPrice;
              }
            },
            {
              title: '收盘',
              render: function(row) {
                return row.closingPrice;
              }
            },
            {
              title: '涨幅',
              render: function(row) {
                var v = (row.closingPrice - row.preClosingPrice) / row.preClosingPrice * 100;
                return v.toFixed(2);
              }
            },
            {
              title: '振幅',
              render: function(row) {
                var v = (row.highestPrice - row.lowestPrice) / row.lowestPrice * 100;
                return v.toFixed(2);
              }
            },
            {
              title: '换手率',
              render: function(row) {
                return row.rurnoverRate;
              }
            },
            {
              title: '成交量',
              render: function(row) {
                return row.tradingVolume;
              }
            },
            {
              title: '成交金额',
              render: function(row) {
                return row.tradingValue;
              }
            }
          ],
          fnDrawCallback: function(result) {
            index = 0;
          }
        },
      });

    }
  </script>

</head>

<body>
  <div id="head" class="head"></div>

  <div class="container">
    <div class="innerBox">
      <ul class="menu-nav">
      </ul>
      <table id="data-table-list" class="data-table-list">
      </table>
    </div>
  </div>

  <div id="foot" class="foot"></div>

</body>

</html>
